package main

import "github.com/labstack/echo/v4"

type Context struct {
	echo.Context
	shipVoyageRepo ShipVoyageRepo
	wharfRepo      WharfRepo
}

func FromEchoContext(c echo.Context) *Context {
	cc := c.(*Context)
	return cc
}

func (c *Context) GetShipVoyageRepo() (ShipVoyageRepo, error) {
	return c.shipVoyageRepo, nil
}

func (c *Context) GetWharfRepo() (WharfRepo, error) {
	return c.wharfRepo, nil
}

func (c *Context) GetShipVoyageScheduleDB() (ShipVoyageScheduleDB, error) {
	return ShipVoyageScheduleDBStruct{}, nil
}
